package py.edu.ucom.c417.cadira.tablero;

import py.edu.ucom.c417.cadira.R;
import android.content.Context;
import android.graphics.drawable.Drawable;

public class Ficha {
	private boolean color;
	private String rango;
	private int valor;
	private Drawable imagen = null;
	private int cantidadFicha;

	public int getCantidadFicha() {
		return cantidadFicha;
	}

	public void setCantidadFicha(int cantidadFicha) {
		this.cantidadFicha = cantidadFicha;
	}

	public void setImagen(Drawable imagen) {
		this.imagen = imagen;
	}

	public Ficha(int valor, boolean color, Context context) {
		
		this.valor = valor;
		this.color = color;
		switch (valor) {
		case 0:
			this.rango = ("espia");
			this.imagen = context.getResources().getDrawable(R.drawable.espia);
			break;
		case 1:
			this.rango = ("bandera");
			this.imagen = context.getResources().getDrawable(
					R.drawable.bandera1);
			break;
		case 2:
			this.rango = ("soldado");
			this.imagen = context.getResources()
					.getDrawable(R.drawable.soldado);
			break;
		case 3:
			this.rango = ("cabo");
			this.imagen = context.getResources().getDrawable(R.drawable.cabo);
			
			break;
		case 4:
			this.rango = ("sargento");
			this.imagen = context.getResources().getDrawable(
					R.drawable.sargento);
			break;
		case 5:
			this.rango = ("capitan");
			this.imagen = context.getResources()
					.getDrawable(R.drawable.capitan);
			break;
		case 6:
			this.rango = ("mayor");
			this.imagen = context.getResources().getDrawable(R.drawable.mayor);
			break;
		case 7:
			this.rango = ("teniente");
			this.imagen = context.getResources().getDrawable(
					R.drawable.teniente);
			break;
		case 8:
			this.rango = ("coronel");
			this.imagen = context.getResources()
					.getDrawable(R.drawable.coronel);
			break;
		case 9:
			this.rango = ("general");
			this.imagen = context.getResources()
					.getDrawable(R.drawable.general);
			break;
		case 10:
			this.rango = ("mariscal");
			this.imagen = context.getResources().getDrawable(
					R.drawable.mariscal);
			break;
		case 11:
			this.rango = ("bomba");
			this.imagen = context.getResources().getDrawable(R.drawable.bomba);
			break;
		}

	}

	public String getColorString() {
		if (this.color = true) {
			return "Rojo";
		}
		return "Azul";
	}

	public boolean getColor() {
		return this.color;
	}

	public void setColor(boolean color) {
		this.color = color;
	}

	public String getRango() {
		return rango;
	}

	public void setRango(String rango) {
		this.rango = rango;
	}

	public int getValor() {
		return valor;
	}

	public void setValor(int valor) {
		this.valor = valor;
	}

	public Drawable getImagen() {
		return imagen;
	}
}
